<?php
include_once "connect.php";
include "function.php";

if (isset($_SESSION)) {
    $user = $_SESSION["user"];
} else {
    session_start(); 
}
$title = "Máy Móc Phụ Tùng";

$file = "include/content.php";
if (isset($_REQUEST["b"])) {
    $file = "include/".$_REQUEST['b'].".php";
}

if (isset($_SESSION["success"])) {
    $loginInclude = "login_success.php";
} else {
    $loginInclude = "login.php";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?php echo $title; ?></title>
        <link rel="shortcut icon" href="favicon.ico">
        <link type="text/css" rel="stylesheet" href="css/style.css" />
        <link type="text/css" rel="stylesheet" href="css/menu.css" />
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
        <script language="JavaScript" type="text/JavaScript" src="js/quanly.js"></script>
        <script language="JavaScript" type="text/JavaScript" src="lib/ckeditor/ckeditor.js"></script>
        <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
        <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
        <script type="text/JavaScript" src="js/ajax.js" ></script>
        <script language="JavaScript" type="text/JavaScript" src="Scripts/avim.js"></script>
    </head>

    <body>
        <script type="text/javascript" src="Scripts/tooltip/wz_tooltip.js"></script> 
        <script type="text/javascript" src="Scripts/tooltip/tip_balloon.js"></script> 
        <script type="text/javascript" src="Scripts/tooltip/tip_centerwindow.js"></script> 
        <script type="text/javascript" src="Scripts/tooltip/tip_followscroll.js"></script>
        <div id="container">
            <div id="header">
                <?php include "include/header.php"; ?>
            </div>
            <div id="menu-top">      
                <?php include "menu-top.php"; ?>   
            </div>
            <br clear="all" />

            <div id="main" style="margin-top:0px;">
                <div id="content-left">
                    <?php 
                        include "include/menu-left-or.php";
                        include "include/$loginInclude";
                    ?>
                    <div style="height:5px"></div>
                    <?php include "timkiem.php"; ?>		
                    <div style="height:5px"></div>
                    <?php include "include/menu-giohang.php"; ?>	
                    <div style="height:5px"></div> 
                    <?php include "include/hotro.php"; ?> 
                    <embed id="Advertisement" 
                    width="195" height="450" 
                    flashvars="clickTARGET=_blank&clickTAG=#"
                    allowscriptaccess="always"
                    wmode="transparent" quality="high" 
                    name="Advertisement" style="admincp" 
                    src="images/1422004784-xem-gi-hn.swf" 
                    type="application/x-shockwave-flash">
                    <embed id="Advertisement" 
                    width="195" height="750" 
                    flashvars="clickTARGET=_blank&clickTAG=#"
                    allowscriptaccess="always"
                    wmode="transparent" quality="high" 
                    name="Advertisement" style="admincp" 
                    src="images/mypham.swf" 
                    type="application/x-shockwave-flash">
                </div>
                <div id="content">
                    <?php include "$file"; ?>
                </div>
            </div>
        </div>
        <div id="footer">
            <?php include "include/footer.php"; ?>   
        </div>
    </body>
</html>